const { execSQL } = require("../db/mysql")

const getList = (author, keyword) => {
    let sql = `select * from blog where 1=1 `
    //从数据库里面拿
    if (author) {
        sql += `and author='${author}' `
    }
    if (keyword) {
        sql += `and title like '%${keyword}%' `
    }
    return execSQL('select * from blog')
}
const list = () => {
    console.log(123123)
}
exports.getList = list